<?php
use yii\helpers\Html;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use yii\widgets\LinkPager;
use frontend\controllers\XiehuiController;
use common\models\fenhuiartic\Fenhuiartic;
use common\models\member\Member;
use common\models\category\Category;
use common\models\fenhuicat\Fenhuicat;
$t=Fenhuicat::findBySql("SELECT id,name FROM fenhuicat where status = 1 and id = '$cid'")->asArray()->one();

$this->title = $t['name'];
$this->params['breadcrumbs'][] = $this->title;
?>
    <!--content-->
    <div class="content">
        <div class="w1113 bgd-ff mt10 mb10">
            <span class="abwz">
                   您所在的位置：<a href="<?= yii\helpers\Url::to(['/']);?>">首页</a> >
                <a href="<?= $fg['id'];?>"><?= $fg['name'];?></a> >
                <a> <?= $t['name']; ?></a>
<!--                您所在的位置：<a href="">首页</a> > <a href="">协会</a>-->
            </span>
        </div>
        <div class="w1113 bgd-ff">
            <div class="clearFloat pl20 pr20 pt15 pb50">
                <div class="ableft floatLeft">
                    <div class="ablewidt">
                        <h3 class="anh3">协会</h3>
                        <div class="jquery-accordion-menu">
                            <ul  class="acb">
                            <?php foreach ($plist as $key=>$pl){?>

                                            <li <?php ?>>
                                    <?php if(!empty($pl['zlm'])){ ?>
                                                <a href="" >
                                     <?php }else{ ?>
                                                <a href="<?= yii\helpers\Url::to([$pl['type'],'id' => $id,'cid'=>$pl['id']]); ?>" >
                                      <?php } ?>
                                                    <?=$pl['name'];?>
                                                </a>
                                    <?php if(!empty($pl['zlm'])){ ?>
                                            <ul class="submenu">
                                                <?php foreach ($pl['zlm'] as $pz){ ?>
                                                    <li><a href="<?= yii\helpers\Url::to([$pz['type'],'id' => $id,'cid'=>$pz['id']]); ?>"><?=$pz['name']; ?></a></li>
                                                <?php } ?>
                                            </ul>
                                    <?php } ?>
                                            </li>
                            <?php } ?>
                            </ul>
                        </div>
                    </div>

                    <script type="text/javascript">
                        $(function(){
                            jQuery(".jquery-accordion-menu").jqueryAccordionMenu();
                        });
                        $(function(){
                            //顶部导航切换
                            $(".acb li").click(function(){
                                $(".acb li.active").removeClass("active")
                                $(this).addClass("active");
                            })
                        })
                    </script>
                </div>

                <div class="abright floatRight">
                    <div class="clearFloat tblist">
                        <ul class="clearFloat">
                            <?php foreach( $fenhuilist as $li ){ ?>
                            <li <?php if($id == $li['id']){ ?> class="tblact"<?php } ?>>
                                <a href="<?= $li['id'];?>"><?=$li['name']; ?></a>
                            </li>
                        <?php } ?>

                        </ul>
                    </div>
                    <div class="abrwidth">
                        <div class="clearFloat abrwidt">
                            <h3 class="xhjsh3">
                                <font class="ttt"><?=$ar['title'];?></font>
                                <span class="xhjstime"><?= date('Y/m/d H:i:s',$ar['created_at']); ?><div style="display:inline-block; float:right;" class="bdsharebuttonbox"><img class="fenx" style="float:left" src="<?= yii::getAlias('@web');?>/images/fenx.jpg" /><a href="#" class="bds_more" data-cmd="more"></a><a href="#" class="bds_weixin" data-cmd="weixin" title="分享到微信"></a></div>
<script>window._bd_share_config={"common":{"bdSnsKey":{},"bdText":"","bdMini":"2","bdMiniList":false,"bdPic":"","bdStyle":"2","bdSize":"16"},"share":{},"image":{"viewList":["weixin"],"viewText":"分享到：","viewSize":"16"},"selectShare":{"bdContainerClass":null,"bdSelectMiniList":["weixin"]}};with(document)0[(getElementsByTagName('head')[0]||body).appendChild(createElement('script')).src='http://bdimg.share.baidu.com/static/api/js/share.js?v=89860593.js?cdnversion='+~(-new Date()/36e5)];</script></span>
                            </h3>
                            <div class="clearFloat xhp">
                      <?=$ar['content']; ?>
                            </div>
                        </div>
                        <div class="clearFloat xhxgxw">
                            <h3 class="xgxwtit">Related news</h3>
                            <div class="xgxwcont">
                                <ul>
                                    <?php foreach($newslist as $nl){?>
                                    <li>
                                        <a href="<?= yii\helpers\Url::to(['list/newscontent','id' => $nl['id']]); ?>"><?php echo(mb_substr(strip_tags($nl['title']),0,32,'utf-8')); ?><?php if(strlen($nl['title']) > 97) { echo '...'; } ?></a>
                                    </li>
                                    <?php } ?>

                                </ul>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
        </div>
    </div>
    <!--content end-->
